package com.chinasoft.reposearch.entity.po;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Repo {
    private String owner;
    private String name;
    private Long stars;
    private Long forks;
    private Long watchers;
    private Boolean isFork;
    private List<Language> languages;
    private Long languageCount;
    private List<Topic> topics;
    private Long topicCount;
    private String description;
    private String primaryLanguage;
    private String createdAt;
    private String pushedAt;


    // --- 内部类 ---
    public static class Language {
        private String name;
        private Integer size;

        public String getName() { return name; }
        public void setName(String name) { this.name = name; }

        public Integer getSize() { return size; }
        public void setSize(Integer size) { this.size = size; }
    }

    public static class Topic {
        private String name;
        private Integer stars;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getStars() {
            return stars;
        }

        public void setStars(Integer stars) {
            this.stars = stars;
        }
    }
}
